package com.topideal.supplychain.hades.dto;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlRootElement;

import com.fasterxml.jackson.annotation.JsonIgnore;

@XmlRootElement
public class DubheResponse implements Serializable {

    /**
	 *
	 */
	private static final long serialVersionUID = 1L;

	private String flag = "failure";
    
    private String code;
    
    private String message;

    public DubheResponse() {
    }

    public String getFlag() {
        return this.flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return this.message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @JsonIgnore
    public boolean isSuccess() {
        return "success".equals(this.flag);
    }
}
